//
//  WebController.m
//  网易新闻
//
//  Created by dllo on 15/10/10.
//  Copyright (c) 2015年 Lx. All rights reserved.
//

#import "WebController.h"

@interface WebController ()
@property(nonatomic, retain)UIWebView *web;
@end

@implementation WebController

- (void)viewWillAppear:(BOOL)animated{
    self.automaticallyAdjustsScrollViewInsets = NO;
    self.tabBarController.tabBar.hidden = YES;
    self.navigationController.navigationBar.barTintColor = [UIColor whiteColor];
    self.navigationController.navigationBar.alpha = 0.1;
}
- (void)viewWillDisappear:(BOOL)animated{
    self.navigationController.navigationBar.alpha = 1;
}
- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    self.web = [[UIWebView alloc]initWithFrame:CGRectMake(0, 20, 375, 645)];
    self.web.scrollView.bounces = NO;
    [self.web loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:self.url]]];
    [self.web setScalesPageToFit:YES];
    [self.view addSubview:self.web];
    [self.web release];
}

- (void)dealloc{
    [self.web stopLoading];
    [_web release];
    [_url release];
    [super dealloc];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
